home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 March / PCWorld_2008-03_cd.bin / v cisle / pcwvista / pcwVistaServices1.1.exe / pcwVistaServices1.1 / pcwVistaServices.hta
Text File  |  2008-01-13  |  28KB  |  743 lines

  1. <HTML>
  2.  <HEAD>
  3.   <TITLE>Konfigurace slu₧eb ve Windows Vista
  4.   </TITLE>
  5.   <HTA:APPLICATION
  6.    ID = "VistaServices"
  7.    APPLICATIONNAME = "VistaServices"
  8.    ICON="./Tools/IDG.ICO"
  9.    BORDER = "normal"
  10.    CAPTION = "yes"
  11.    SHOWINTASKBAR = "yes"
  12.    SINGLEINSTANCE = "yes"
  13.    SYSMENU = "yes"
  14.    WINDOWSTATE = "normal"
  15.    SCROLL = "no"
  16.    SCROLLFLAT = "no"
  17.    VERSION = "1.0"
  18.    INNERBORDER = "no"
  19.    SELECTION = "no"
  20.    MAXIMIZEBUTTON = "no"
  21.    MINIMIZEBUTTON = "yes"
  22.    NAVIGABLE = "No"
  23.    CONTEXTMENU = "no"
  24.    BORDERSTYLE = "normal"/>
  25.  
  26. <STYLE type="text/css">
  27. body            {font-family:Tahoma,Verdana,Arial,Geneva;
  28.     border:none;
  29.     scrollbar-arrow-color: #BBF0FF;
  30.     scrollbar-base-color: #000000;
  31.     scrollbar-dark-shadow-color: #00204A;
  32.     scrollbar-track-color: #00204A;
  33.     scrollbar-face-color: #2969B5;
  34.     scrollbar-shadow-color: #000000;
  35.     scrollbar-highlight-color: #00204A;
  36.     scrollbar-3d-light-color: #00204A;
  37.     font-style:normal;
  38.     font-size:12;
  39.     color:#FFFFFF;
  40.     background-color:#2969B5;
  41.     filter:progid:DXImageTransform.Microsoft.Gradient(
  42.     GradientType=1,
  43.     StartColorStr="#00204A",
  44.     EndColorStr="#00357B");
  45. }
  46. .Label    {
  47.     font-family:Tahoma,Verdana,Arial,Geneva;
  48.     font-style:normal;
  49.     font-size:12;
  50.     color:#FFFFFF;
  51.     background-color:#2969B5;
  52.     filter:progid:DXImageTransform.Microsoft.Gradient(
  53.     GradientType=1,
  54.     StartColorStr="#00204A",
  55.     EndColorStr="#00357B");
  56.     Border:none
  57. }
  58.  
  59. .Textbox    {
  60.     font-family:Tahoma,Verdana,Arial,Geneva;
  61.     font-style:normal;
  62.     font-size:12;
  63.     color:#FFFFFF;
  64.     background-color:#2969B5;
  65.     filter:progid:DXImageTransform.Microsoft.Gradient(
  66.     GradientType=1,
  67.     StartColorStr="#00204A",
  68.     EndColorStr="#00357B");
  69.     border-right: #000000 2pt solid;
  70.     border-top: #000000 2pt solid;
  71.     border-left: #000000 2pt solid;
  72.     border-bottom: #000000 2pt solid;
  73. }
  74.  
  75. .Button    {
  76.     font-family:verdana;
  77.     font-size:12;
  78.     font-weight:bold;
  79.      background-color:#008000;
  80.     color:#FFFFFF;
  81.     border-right: #000000 2pt solid;
  82.     border-top: #000000 2pt solid;
  83.     border-left: #000000 2pt solid;
  84.     border-bottom: #000000 2pt solid;
  85.     filter:Alpha(opacity=100, finishopacity=40, style=3);
  86. }
  87.  
  88. <!--
  89.  a:link { font-family:verdana; font-size:12; color:#FF8000; }
  90.  a:visited { font-family:verdana; font-size:12; color:#FFFFFF; }
  91.  a:hover { font-family:verdana; font-size:12; color:#FF8000; font-weight:bold; }
  92. -->
  93. .Link    {
  94.     font-family:verdana;
  95.     font-size:12;
  96.     color:#FF8000;
  97.  
  98. }
  99. </STYLE>
  100.  
  101.  </HEAD>
  102.  <SCRIPT LANGUAGE="VBScript">
  103.     on error resume next
  104.     Set myfiles = CreateObject("Scripting.FileSystemObject")
  105.     Set myshell = CreateObject("Wscript.Shell")
  106.     Set Pfad = Myfiles.GetFolder(".\Tools")
  107.     if not (myfiles.FileExists(Pfad & "\VistaPCW.bat")) then
  108.         Pfad = Mid(VistaServices.commandLine, 1, InstrRev(VistaServices.commandLine, "\", -1, vbTextCompare)) & "\Tools"
  109.         Pfad = Replace(Pfad, Chr(34), "", 1, -1, vbTextCompare)
  110.     end If
  111.     MinKonf = "VistaMinimal.bat"
  112.     SafeKonf = "VistaSafe.bat"
  113.     pcwKonf = "VistaPCW.bat"
  114.     
  115.     'ZjiÜt∞nφ verze Windows
  116.     Winvers = myshell.Regread("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProductName")
  117.     if Instr(1, lcase(Winvers), "vista") <> 0 then
  118.         if Instr(1, lcase(Winvers), "home basic") then
  119.             DefaultVal = "Standardnφ konfigurace Vista Home Basic"
  120.             DefKonf = "VistaHomeBasic.bat"
  121.             DefHTM = "DefHomeBasic.htm"
  122.             DefaultSys = "Vista Home Basic"
  123.         elseif Instr(1, lcase(Winvers), "home premium") then
  124.             DefaultVal = "Standardnφ konfigurace Vista Home Premium"
  125.             DefKonf = "VistaHomePremium.bat"
  126.             DefHTM = "DefHomePremium.htm"
  127.             DefaultSys = "Vista Home Premium"
  128.         elseif Instr(1, lcase(Winvers), "ultimate") then
  129.             DefaultVal = "Standardnφ konfigurace Vista Ultimate"
  130.             DefKonf = "VistaUltimate.bat"
  131.             DefHTM = "DefUltimate.htm"
  132.             DefaultSys = "Vista Ultimate"
  133.         end if
  134.     else
  135.         msgbox "Tato utilita je urΦena pouze pro Windows Vista (Home Basic, Home Premium oder Ultimate)", vbOkOnly+vbExclamation, "Chyba"
  136.         call SubQuit
  137.     End If
  138.     
  139. '==========================================================================
  140.  
  141.     Sub SubInitFenster
  142.         on error resume next
  143.         FB = screen.availWidth       'Dosa₧itelnß Üφ°ka okna
  144.         FH = screen.availHeight      'Dosa₧itelnß v²Üka okna
  145.         nScaleFactor = screen.deviceXDPI/screen.logicalXDPI
  146.          if FB=800 then
  147.             FB=INT(FB*0.88*nScalefactor)
  148.             FH=INT(FH*nScalefactor)
  149.             FEN=INT(FH*0.25)
  150.         elseif FB=1024 then
  151.             FB=INT(FB*0.69*nScalefactor)
  152.             FH=INT(FH*0.88*nScalefactor)
  153.             FEN=INT(FH*0.4*nScalefactor)
  154.         elseif FB=1152 then
  155.             FB=INT(FB*0.61*nScalefactor)
  156.             FH=INT(FH*0.75*nScalefactor)
  157.             FEN=INT(FH*0.4*nScalefactor)
  158.         else
  159.             FB=INT(FB*0.56*nScalefactor)
  160.             FH=INT(FH*0.65*nScalefactor)
  161.             FEN=INT(FH*0.4*nScalefactor)
  162.         end if
  163.         document.all.Deflabel.Value = DefaultVal
  164.         document.all.TheFrame.style.setAttribute "height", FEN, False
  165.         Window.resizeTo FB, FH        'Zm∞n∞nß Üφ°ka a v²Üka 
  166.         If not (myfiles.FileExists(Pfad & "\VistaLast.bat")) then
  167.             document.all.ServKonf(4).disabled = True
  168.         else
  169.             document.all.ServKonf(4).disabled = False
  170.         end if
  171.         If not (myfiles.FileExists(Pfad & "\VistaOrg.bat")) then
  172.             document.all.ServKonf(5).disabled = True
  173.         else
  174.             document.all.ServKonf(5).disabled = False
  175.         end if
  176.     End Sub
  177.  
  178. '==========================================================================    
  179.     
  180.     Function LoadKonf(Config)
  181.         if Config = "Def" then
  182.             InFrame = DefHTM
  183.         elseif Config = "last" then
  184.             InFrame = "Konfigurace slu₧eb p°ed poslednφ provedenou zm∞nou"
  185.             document.all.TheFrame.innerHTML = InFrame
  186.             exit function
  187.         elseif Config = "org" then
  188.             InFrame = "PoΦßteΦnφ konfigurace"
  189.             document.all.TheFrame.innerHTML = InFrame
  190.             exit function
  191.         else
  192.             InFrame = Config & ".htm"                
  193.         end if
  194.         Set ConfFile = myfiles.Opentextfile(Pfad & "\" & InFrame, 1, False)
  195.         ConfTxt = ConfFile.Readall
  196.         ConfFile.Close
  197.         document.all.TheFrame.innerHTML = ConfTxt
  198.     end Function
  199.  
  200. '==========================================================================
  201.  
  202.     function ShowHelp(Config)
  203.         if Config = "Def" then
  204.             msgbox "V²chozφ nastavenφ slu₧eb " & DefaultSys & ".", vbOkOnly+vbInformation, DefaultVal
  205.         elseif Config = "Safe" then
  206.             msgbox "Jednß se o takovΘ nastavenφ slu₧eb, kterΘ pro v∞tÜinu u₧ivatel∙ nijak neovlivnφ ani vzhled a ani funkΦnost systΘmu. Nem∞li byste zaznamenat ₧ßdnΘ zßva₧n∞jÜφ zm∞ny.", vbOkOnly+vbInformation, "Konfigurace slu₧eb s ohledem na stabilitu a maximßlnφ funkΦnost systΘmu"
  207.         elseif Config = "pcw" then
  208.             msgbox "Toto nastavenφ ukonΦφ celou °adu slu₧eb, kterΘ spot°ebovßvajφ spoustu prost°edk∙ systΘmu a kterΘ jsou pro v∞tÜinu b∞₧n²ch u₧ivatel∙ zbyteΦnΘ. Dojde sice zßrove≥ i k vypnutφ rozhranφ Aero, nicmΘn∞ mo₧nost nastavenφ vzhledu z∙stßvß zachovßna.", vbOkOnly+vbInformation, "Nastavenφ slu₧eb doporuΦovanΘ PC-WORLDem"
  209.         elseif Config = "Min" then
  210.             msgbox "Toto nastavenφ zastavφ vÜechny slu₧by, kterΘ nejsou pot°eba pro b∞₧nou prßci u₧ivatel∙. Mimo jinΘ dojde k vypnutφ rozhranφ Aero, mo₧nosti nastavenφ vzhled∙, slu₧by Windows Update a firewallu Windows", vbOkOnly+vbInformation, "Konfigurace slu₧eb na minimßlnφ nutnΘ ·rovni"
  211.         elseif Config = "last" then
  212.             msgbox "Nastavφ takovou konfiguraci slu₧eb, kterß byla v platnosti p°ed poslednφ zm∞nou provedenou touto utilitou.", vbOkOnly+vbInformation, "Obnovenφ poslednφ pou₧itΘ konfigurace slu₧eb"
  213.         elseif Config = "org" then
  214.             msgbox "Nastavφ takovou konfiguraci slu₧eb, kterß byla v platnosti p°ed prvnφm pou₧itφm tΘto utility.", vbOkOnly+vbInformation, "Obnovenφ v²chozφ konfigurace slu₧eb"            
  215.         end if
  216.     end function
  217.     
  218. '==========================================================================    
  219.     
  220.     Function SubSet
  221.         if document.all.ServKonf(0).Checked then
  222.             Call SaveConfig
  223.             myshell.run "cmd /c " & chr(34) & Pfad & "\" & DefKonf & chr(34), 1, True
  224.             call LoadKonf("Def")
  225.         elseif document.all.ServKonf(1).Checked then
  226.             Call SaveConfig
  227.             myshell.run "cmd /c " & chr(34) & Pfad & "\VistaSafe.bat" & chr(34), 1, True
  228.             call LoadKonf("Safe")
  229.         elseif document.all.ServKonf(2).Checked then
  230.             Call SaveConfig
  231.             myshell.run "cmd /c " & chr(34) & Pfad & "\VistaPCW.bat" & chr(34), 1, True
  232.             call LoadKonf("pcw")
  233.         elseif document.all.ServKonf(3).Checked then
  234.             Call SaveConfig
  235.             myshell.run "cmd /c " & chr(34) & Pfad & "\VistaMinimal.bat" & chr(34), 1, True
  236.             call LoadKonf("Min")
  237.         elseif document.all.ServKonf(4).Checked then
  238.             myshell.run "cmd /c " & chr(34) & Pfad & "\VistaLast.bat" & chr(34), 1, True
  239.             call LoadKonf("last")
  240.         elseif document.all.ServKonf(5).Checked then
  241.             Call SaveConfig
  242.             myshell.run "cmd /c " & chr(34) & Pfad & "\VistaOrg.bat" & chr(34), 1, True
  243.             call LoadKonf("org")
  244.         end if
  245.     End Function
  246.  
  247. '==========================================================================
  248.     
  249.     Function SaveConfig
  250.     Set LastConf = myfiles.OpenTextFile(Pfad & "\VistaLast.Bat", 2, True)
  251.     LastConf.WriteLine "sc boot ok"
  252.     LastConf.WriteLine "sc config AeLookupSvc start= " & GetSvcStatus("AeLookupSvc")
  253.     LastConf.WriteLine "sc config Appinfo start= " & GetSvcStatus("Appinfo")
  254.     LastConf.WriteLine "sc config ALG start= " & GetSvcStatus("ALG")
  255.     LastConf.WriteLine "sc config AppMgmt start= " & GetSvcStatus("AppMgmt")
  256.     LastConf.WriteLine "sc config BITS start= " & GetSvcStatus("BITS")
  257.     LastConf.WriteLine "sc config BFE start= " & GetSvcStatus("BFE")
  258.     LastConf.WriteLine "sc config wbengine start= " & GetSvcStatus("wbengine")
  259.     LastConf.WriteLine "sc config CertPropSvc start= " & GetSvcStatus("CertPropSvc")
  260.     LastConf.WriteLine "sc config KeyIso start= " & GetSvcStatus("KeyIso")
  261.     LastConf.WriteLine "sc config EventSystem start= " & GetSvcStatus("EventSystem")
  262.     LastConf.WriteLine "sc config COMSysApp start= " & GetSvcStatus("COMSysApp")
  263.     LastConf.WriteLine "sc config Browser start= " & GetSvcStatus("Browser")
  264.     LastConf.WriteLine "sc config CryptSvc start= " & GetSvcStatus("CryptSvc")
  265.     LastConf.WriteLine "sc config UxSms start= " & GetSvcStatus("UxSms")
  266.     LastConf.WriteLine "sc config DFSR start= " & GetSvcStatus("DFSR")
  267.     LastConf.WriteLine "sc config Dhcp start= " & GetSvcStatus("Dhcp")
  268.     LastConf.WriteLine "sc config DPS start= " & GetSvcStatus("DPS")
  269.     LastConf.WriteLine "sc config WdiServiceHost start= " & GetSvcStatus("WdiServiceHost")
  270.     LastConf.WriteLine "sc config WdiSystemHost start= " & GetSvcStatus("WdiSystemHost")
  271.     LastConf.WriteLine "sc config TrkWks start= " & GetSvcStatus("TrkWks")
  272.     LastConf.WriteLine "sc config MSDTC start= " & GetSvcStatus("MSDTC")
  273.     LastConf.WriteLine "sc config Dnscache start= " & GetSvcStatus("Dnscache")
  274.     LastConf.WriteLine "sc config EapHost start= " & GetSvcStatus("EapHost")
  275.     LastConf.WriteLine "sc config Fax start= " & GetSvcStatus("Fax")
  276.     LastConf.WriteLine "sc config fdPHost start= " & GetSvcStatus("fdPHost")
  277.     LastConf.WriteLine "sc config FDResPub start= " & GetSvcStatus("FDResPub")
  278.     LastConf.WriteLine "sc config hkmsvc start= " & GetSvcStatus("hkmsvc")
  279.     LastConf.WriteLine "sc config hidserv start= " & GetSvcStatus("hidserv")
  280.     LastConf.WriteLine "sc config IKEEXT start= " & GetSvcStatus("IKEEXT")
  281.     LastConf.WriteLine "sc config UI0Detect start= " & GetSvcStatus("UI0Detect")
  282.     LastConf.WriteLine "sc config SharedAccess start= " & GetSvcStatus("SharedAccess")
  283.     LastConf.WriteLine "sc config iphlpsvc start= " & GetSvcStatus("iphlpsvc")
  284.     LastConf.WriteLine "sc config PolicyAgent start= " & GetSvcStatus("PolicyAgent")
  285.     LastConf.WriteLine "sc config KtmRm start= " & GetSvcStatus("KtmRm")
  286.     LastConf.WriteLine "sc config clr_optimization_v2.0.50727_32 start= " & GetSvcStatus("clr_optimization_v2.0.50727_32")
  287.     LastConf.WriteLine "sc config MSiSCSI start= " & GetSvcStatus("MSiSCSI")
  288.     LastConf.WriteLine "sc config swprv start= " & GetSvcStatus("swprv")
  289.     LastConf.WriteLine "sc config MMCSS start= " & GetSvcStatus("MMCSS")
  290.     LastConf.WriteLine "sc config NetTcpPortSharing start= " & GetSvcStatus("NetTcpPortSharing")
  291.     LastConf.WriteLine "sc config NetLogon start= " & GetSvcStatus("NetLogon")
  292.     LastConf.WriteLine "sc config napagent start= " & GetSvcStatus("napagent")
  293.     LastConf.WriteLine "sc config Netman start= " & GetSvcStatus("Netman")
  294.     LastConf.WriteLine "sc config netprofm start= " & GetSvcStatus("netprofm")
  295.     LastConf.WriteLine "sc config NlaSvc start= " & GetSvcStatus("NlaSvc")
  296.     LastConf.WriteLine "sc config nsi start= " & GetSvcStatus("nsi")
  297.     LastConf.WriteLine "sc config CscService start= " & GetSvcStatus("CscService")
  298.     LastConf.WriteLine "sc config WPCSvc start= " & GetSvcStatus("WPCSvc")
  299.     LastConf.WriteLine "sc config PNRPsvc start= " & GetSvcStatus("PNRPsvc")
  300.     LastConf.WriteLine "sc config p2psvc start= " & GetSvcStatus("p2psvc")
  301.     LastConf.WriteLine "sc config p2pimsvc start= " & GetSvcStatus("p2pimsvc")
  302.     LastConf.WriteLine "sc config pla start= " & GetSvcStatus("pla")
  303.     LastConf.WriteLine "sc config IPBusEnum start= " & GetSvcStatus("IPBusEnum")
  304.     LastConf.WriteLine "sc config PNRPAutoReg start= " & GetSvcStatus("PNRPAutoReg")
  305.     LastConf.WriteLine "sc config WPDBusEnum start= " & GetSvcStatus("WPDBusEnum")
  306.     LastConf.WriteLine "sc config Spooler start= " & GetSvcStatus("Spooler")
  307.     LastConf.WriteLine "sc config wercplsupport start= " & GetSvcStatus("wercplsupport")
  308.     LastConf.WriteLine "sc config PcaSvc start= " & GetSvcStatus("PcaSvc")
  309.     LastConf.WriteLine "sc config ProtectedStorage start= " & GetSvcStatus("ProtectedStorage")
  310.     LastConf.WriteLine "sc config QWAVE start= " & GetSvcStatus("QWAVE")
  311.     LastConf.WriteLine "sc config EMDMgmt start= " & GetSvcStatus("EMDMgmt")
  312.     LastConf.WriteLine "sc config RasAuto start= " & GetSvcStatus("RasAuto")
  313.     LastConf.WriteLine "sc config RasMan start= " & GetSvcStatus("RasMan")
  314.     LastConf.WriteLine "sc config RpcLocator start= " & GetSvcStatus("RpcLocator")
  315.     LastConf.WriteLine "sc config RemoteRegistry start= " & GetSvcStatus("RemoteRegistry")
  316.     LastConf.WriteLine "sc config RemoteAccess start= " & GetSvcStatus("RemoteAccess")
  317.     LastConf.WriteLine "sc config seclogon start= " & GetSvcStatus("seclogon")
  318.     LastConf.WriteLine "sc config SamSs start= " & GetSvcStatus("SamSs")
  319.     LastConf.WriteLine "sc config wscsvc start= " & GetSvcStatus("wscsvc")
  320.     LastConf.WriteLine "sc config LanmanServer start= " & GetSvcStatus("LanmanServer")
  321.     LastConf.WriteLine "sc config ShellHWDetection start= " & GetSvcStatus("ShellHWDetection")
  322.     LastConf.WriteLine "sc config SLUINotify start= " & GetSvcStatus("SLUINotify")
  323.     LastConf.WriteLine "sc config SCardSvr start= " & GetSvcStatus("SCardSvr")
  324.     LastConf.WriteLine "sc config SCPolicySvc start= " & GetSvcStatus("SCPolicySvc")
  325.     LastConf.WriteLine "sc config SNMPTRAP start= " & GetSvcStatus("SNMPTRAP")
  326.     LastConf.WriteLine "sc config slsvc start= " & GetSvcStatus("slsvc")
  327.     LastConf.WriteLine "sc config SSDPSRV start= " & GetSvcStatus("SSDPSRV")
  328.     LastConf.WriteLine "sc config SysMain start= " & GetSvcStatus("SysMain")
  329.     LastConf.WriteLine "sc config SENS start= " & GetSvcStatus("SENS")
  330.     LastConf.WriteLine "sc config TabletInputService start= " & GetSvcStatus("TabletInputService")
  331.     LastConf.WriteLine "sc config lmhosts start= " & GetSvcStatus("lmhosts")
  332.     LastConf.WriteLine "sc config TapiSrv start= " & GetSvcStatus("TapiSrv")
  333.     LastConf.WriteLine "sc config TermService start= " & GetSvcStatus("TermService")
  334.     LastConf.WriteLine "sc config SessionEnv start= " & GetSvcStatus("SessionEnv")
  335.     LastConf.WriteLine "sc config UmRdpService start= " & GetSvcStatus("UmRdpService")
  336.     LastConf.WriteLine "sc config Themes start= " & GetSvcStatus("Themes")
  337.     LastConf.WriteLine "sc config THREADORDER start= " & GetSvcStatus("THREADORDER")
  338.     LastConf.WriteLine "sc config TBS start= " & GetSvcStatus("TBS")
  339.     LastConf.WriteLine "sc config upnphost start= " & GetSvcStatus("upnphost")
  340.     LastConf.WriteLine "sc config ProfSvc start= " & GetSvcStatus("ProfSvc")
  341.     LastConf.WriteLine "sc config vds start= " & GetSvcStatus("vds")
  342.     LastConf.WriteLine "sc config VSS start= " & GetSvcStatus("VSS")
  343.     LastConf.WriteLine "sc config WebClient start= " & GetSvcStatus("WebClient")
  344.     LastConf.WriteLine "sc config Audiosrv start= " & GetSvcStatus("Audiosrv")
  345.     LastConf.WriteLine "sc config AudioEndpointBuilder start= " & GetSvcStatus("AudioEndpointBuilder")
  346.     LastConf.WriteLine "sc config SDRSVC start= " & GetSvcStatus("SDRSVC")
  347.     LastConf.WriteLine "sc config idsvc start= " & GetSvcStatus("idsvc")
  348.     LastConf.WriteLine "sc config WcsPlugInService start= " & GetSvcStatus("WcsPlugInService")
  349.     LastConf.WriteLine "sc config wcncsvc start= " & GetSvcStatus("wcncsvc")
  350.     LastConf.WriteLine "sc config WinDefend start= " & GetSvcStatus("WinDefend")
  351.     LastConf.WriteLine "sc config wudfsvc start= " & GetSvcStatus("wudfsvc")
  352.     LastConf.WriteLine "sc config WerSvc start= " & GetSvcStatus("WerSvc")
  353.     LastConf.WriteLine "sc config Wecsvc start= " & GetSvcStatus("Wecsvc")
  354.     LastConf.WriteLine "sc config Eventlog start= " & GetSvcStatus("Eventlog")
  355.     LastConf.WriteLine "sc config MpsSvc start= " & GetSvcStatus("MpsSvc")
  356.     LastConf.WriteLine "sc config stisvc start= " & GetSvcStatus("stisvc")
  357.     LastConf.WriteLine "sc config msiserver start= " & GetSvcStatus("msiserver")
  358.     LastConf.WriteLine "sc config Winmgmt start= " & GetSvcStatus("Winmgmt")
  359.     LastConf.WriteLine "sc config Mcx2Svc start= " & GetSvcStatus("Mcx2Svc")
  360.     LastConf.WriteLine "sc config ehRecvr start= " & GetSvcStatus("ehRecvr")
  361.     LastConf.WriteLine "sc config ehSched start= " & GetSvcStatus("ehSched")
  362.     LastConf.WriteLine "sc config ehstart start= " & GetSvcStatus("ehstart")
  363.     LastConf.WriteLine "sc config WMPNetworkSvc start= " & GetSvcStatus("WMPNetworkSvc")
  364.     LastConf.WriteLine "sc config TrustedInstaller start= " & GetSvcStatus("TrustedInstaller")
  365.     LastConf.WriteLine "sc config FontCache3.0.0.0 start= " & GetSvcStatus("FontCache3.0.0.0")
  366.     LastConf.WriteLine "sc config WinRM start= " & GetSvcStatus("WinRM")
  367.     LastConf.WriteLine "sc config Wsearch start= " & GetSvcStatus("Wsearch")
  368.     LastConf.WriteLine "sc config W32Time start= " & GetSvcStatus("W32Time")
  369.     LastConf.WriteLine "sc config wuauserv start= " & GetSvcStatus("wuauserv")
  370.     LastConf.WriteLine "sc config WinHttpAutoProxySvc start= " & GetSvcStatus("WinHttpAutoProxySvc")
  371.     LastConf.WriteLine "sc config dot3svc start= " & GetSvcStatus("dot3svc")
  372.     LastConf.WriteLine "sc config Wlansvc start= " & GetSvcStatus("Wlansvc")
  373.     LastConf.WriteLine "sc config wmiApSrv start= " & GetSvcStatus("wmiApSrv")
  374.     LastConf.WriteLine "sc config LanmanWorkstation start= " & GetSvcStatus("LanmanWorkstation")
  375.     LastConf.Close
  376.     
  377.     Set Batch = Myfiles.opentextfile(Pfad & "\VistaLast.Bat", 1, False)
  378.      BatchTxt = Batch.Readall
  379.      Batch.Close
  380.      x = 0
  381.      Suchstr = "start= auto"
  382.      Insert = "sc start"
  383.      Do
  384.          findme = InStr(x+1, BatchTxt, Suchstr, 1)
  385.          x = findme
  386.          If findme = 0 Then Exit Do
  387.          findconf = InstrRev(BatchTxt, "sc config ", findme, 1)
  388.          SvcName = Mid(BatchTxt, findconf+10, findme-findconf-11)
  389.          BatchTxt = replace(BatchTxt, "sc config " & SvcName & " " & Suchstr, "sc config " & SvcName & " " & Suchstr & vbNewLine & Insert & " " & SvcName, 1,-1,1)
  390.      loop
  391.      Set Batch = Myfiles.opentextfile(Pfad & "\VistaLast.Bat", 2, False)
  392.      Batch.Write BatchTxt
  393.      Batch.Close
  394.      BatchTxt = ""
  395.      
  396.      Set Batch = Myfiles.opentextfile(Pfad & "\VistaLast.Bat", 1, False)
  397.      BatchTxt = Batch.Readall
  398.      Batch.Close
  399.      x = 0
  400.      Suchstr = "start= delayed-auto"
  401.      Insert = "sc start"
  402.      Do
  403.          findme = InStr(x+1, BatchTxt, Suchstr, 1)
  404.          x = findme
  405.          If findme = 0 Then Exit Do
  406.          findconf = InstrRev(BatchTxt, "sc config ", findme, 1)
  407.          SvcName = Mid(BatchTxt, findconf+10, findme-findconf-11)
  408.          BatchTxt = replace(BatchTxt, "sc config " & SvcName & " " & Suchstr, "sc config " & SvcName & " " & Suchstr & vbNewLine & Insert & " " & SvcName, 1,-1,1)
  409.      loop
  410.      Set Batch = Myfiles.opentextfile(Pfad & "\VistaLast.Bat", 2, False)
  411.      Batch.Write BatchTxt
  412.      Batch.Close
  413.      BatchTxt = ""
  414.      
  415.      Set Batch = Myfiles.opentextfile(Pfad & "\VistaLast.Bat", 1, False)
  416.      BatchTxt = Batch.Readall
  417.      Batch.Close
  418.      x = 0
  419.      Suchstr = "start= disabled"
  420.      Insert = "sc stop"
  421.      Do
  422.          findme = InStr(x+1, BatchTxt, Suchstr, 1)
  423.          x = findme
  424.          If findme = 0 Then Exit Do
  425.          findconf = InstrRev(BatchTxt, "sc config ", findme, 1)
  426.          SvcName = Mid(BatchTxt, findconf+10, findme-findconf-11)
  427.          BatchTxt = replace(BatchTxt, "sc config " & SvcName & " " & Suchstr, "sc config " & SvcName & " " & Suchstr & vbNewLine & Insert & " " & SvcName, 1,-1,1)
  428.      loop
  429.      Set Batch = Myfiles.opentextfile(Pfad & "\VistaLast.Bat", 2, False)
  430.      Batch.Write BatchTxt
  431.      Batch.Close
  432.      BatchTxt = ""
  433.      
  434.      Set Batch = Myfiles.opentextfile(Pfad & "\VistaLast.Bat", 1, False)
  435.      BatchTxt = Batch.Readall
  436.      Batch.Close
  437.      x = 0
  438.      Suchstr = "start= demand"
  439.      Insert = "sc stop"
  440.      Do
  441.          findme = InStr(x+1, BatchTxt, Suchstr, 1)
  442.          x = findme
  443.          If findme = 0 Then Exit Do
  444.          findconf = InstrRev(BatchTxt, "sc config ", findme, 1)
  445.          SvcName = Mid(BatchTxt, findconf+10, findme-findconf-11)
  446.          BatchTxt = replace(BatchTxt, "sc config " & SvcName & " " & Suchstr, "sc config " & SvcName & " " & Suchstr & vbNewLine & Insert & " " & SvcName, 1,-1,1)
  447.      loop
  448.      Set Batch = Myfiles.opentextfile(Pfad & "\VistaLast.Bat", 2, False)
  449.      Batch.Write BatchTxt
  450.      Batch.Close
  451.      BatchTxt = ""
  452.      
  453.      If not (myfiles.FileExists(Pfad & "\VistaOrg.bat")) then
  454.         ret = myfiles.copyfile(Pfad & "\VistaLast.bat", Pfad & "\VistaOrg.bat", False)
  455.     end if
  456.      document.all.TheFrame.innerHTML = "Byla provedena zßloha aktußlnφ konfigurace..."
  457.      If not (myfiles.FileExists(Pfad & "\VistaLast.bat")) then
  458.         document.all.ServKonf(4).disabled = True
  459.     else
  460.         document.all.ServKonf(4).disabled = False
  461.     end if
  462.     If not (myfiles.FileExists(Pfad & "\VistaOrg.bat")) then
  463.         document.all.ServKonf(5).disabled = True
  464.     else
  465.         document.all.ServKonf(5).disabled = False
  466.     end if
  467.     end function
  468.     
  469. '==========================================================================    
  470.     
  471.     Function GetSvcStatus(svc)
  472.         on error resume next
  473.         ret = myshell.Regread("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & svc & "\Start")
  474.         if err.number = 0 then
  475.             if ret = 0 then
  476.                 GetSvcStatus = "boot"
  477.             elseif ret = 1 then
  478.                 GetSvcStatus = "system"
  479.             elseif ret = 2 then
  480.                 thedelay = myshell.Regread("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & svc & "\DelayedAutostart")
  481.                 if thedelay = 0 then
  482.                     GetSvcStatus = "auto"
  483.                 elseif thedelay = 1 then
  484.                     GetSvcStatus = "delayed-auto"
  485.                 end if
  486.             elseif ret = 3 then
  487.                 GetSvcStatus = "demand"
  488.             elseif ret = 4 then
  489.                 GetSvcStatus = "disabled"
  490.             else
  491.                 GetSvcStatus = "demand"
  492.             end if
  493.         else
  494.             GetSvcStatus = "demand"
  495.             err.clear
  496.         end if
  497.     End Function
  498.     
  499. '==========================================================================
  500.  
  501.     Sub SubClear(ID)
  502.         document.all.item(ID).Value = ""
  503.     End Sub
  504.  
  505. '==========================================================================
  506.  
  507.     Sub SubQuit
  508.         Set myfiles        = Nothing
  509.         Set myshell        = Nothing
  510.         Window.Close
  511.     End Sub
  512.  
  513. '==========================================================================
  514.   Function high(objekt) 
  515.      objekt.style.background ="#00FF00"
  516.      objekt.filters.alpha.finishopacity = 100
  517.      objekt.filters.alpha.opacity = 100
  518.     End Function
  519.  
  520. '==========================================================================
  521.  
  522.   function low(objekt)
  523.      objekt.style.background ="#008000"
  524.      objekt.filters.alpha.opacity = 100
  525.      objekt.filters.alpha.finishopacity = 40
  526.     End Function
  527.  
  528. '==========================================================================
  529.     
  530. </SCRIPT>
  531.  
  532. <BODY SCROLL="yes" ONLOAD="SubInitFenster">
  533. <TABLE WIDTH=80% BORDER=0 CELLPADDING=4 CELLSPACING=2>
  534.     <TR>
  535.         <TD WIDTH=100% align="left">
  536.             <b>Vyberte po₧adovanou konfiguraci:</b>
  537.         </TD>
  538.         <TR>
  539.         <TD>
  540.             <INPUT
  541.               Name=ServKonf
  542.               Type="radio"
  543.               value="DefKonf"
  544.             onclick="LoadKonf('Def')">
  545.             
  546.             <Input
  547.             Type="button"
  548.             Class="Button"
  549.               OnClick="ShowHelp('Def')"
  550.               name="shelp"
  551.               Value=" ? "
  552.               onMouseOver="high(shelp)"
  553.                 onMouseOut="low(shelp)"
  554.               Title="Informace pro danou konfiguraci"/>
  555.               
  556.               <Input
  557.               Class="Label"
  558.             ID=Deflabel
  559.               Type=text
  560.               Value=""
  561.               Size=90 READONLY>
  562.         </TD>
  563.         </TR>
  564.         <TR>
  565.         <TD>
  566.               <INPUT
  567.               Name=ServKonf
  568.               Type="radio"
  569.               Title="SafeKonf"
  570.             onclick="LoadKonf('Safe')">
  571.             
  572.             <Input
  573.             Type="button"
  574.             Class="Button"
  575.               OnClick="ShowHelp('Safe')"
  576.               name="shelp1"
  577.               Value=" ? "
  578.               onMouseOver="high(shelp1)"
  579.                 onMouseOut="low(shelp1)"
  580.               Title="Informace pro danou konfiguraci"/>
  581.               
  582.               <Input
  583.             Class="Label"
  584.               ID=SafeLabel
  585.             Type=text
  586.               Value="Konfigurace slu₧eb s ohledem na maximßlnφ stabilitu systΘmu"
  587.               Size=90 READONLY>
  588.         </TD>
  589.         </TR>
  590.         <TR>
  591.         <TD>
  592.             <INPUT
  593.               Name=ServKonf
  594.               Type="radio"
  595.               value="pcwKonf"
  596.             onclick="LoadKonf('pcw')">
  597.             
  598.             <Input
  599.             Type="button"
  600.             Class="Button"
  601.               OnClick="ShowHelp('pcw')"
  602.               name="shelp2"
  603.               Value=" ? "
  604.               onMouseOver="high(shelp2)"
  605.                 onMouseOut="low(shelp2)"
  606.               Title="Informace pro danou konfiguraci"/>
  607.               
  608.               <Input
  609.               Class="Label"
  610.             ID=pcwlabel
  611.               Type=text
  612.               Value="Konfigurace slu₧eb doporuΦenß PC-WORLDem"
  613.               Size=90 READONLY>
  614.         </TD>
  615.         </TR>
  616.         <TR>
  617.         <TD>
  618.               <INPUT
  619.               Name=ServKonf
  620.               Type="radio"
  621.               Title="MinKonf"
  622.             onclick="LoadKonf('Min')">
  623.             
  624.             <Input
  625.             Type="button"
  626.             Class="Button"
  627.               OnClick="ShowHelp('Min')"
  628.               name="shelp3"
  629.               Value=" ? "
  630.               onMouseOver="high(shelp3)"
  631.                 onMouseOut="low(shelp3)"
  632.               Title="Informace pro danou konfiguraci"/>
  633.               
  634.               <Input
  635.             Class="Label"
  636.               ID=MinLabel
  637.             Type=text
  638.               Value="Konfigurace slu₧eb na minimßlnφ ·rovni"
  639.               Size=90 READONLY>
  640.         </TD>
  641.         </TR>
  642.         <TR>
  643.         <TD>
  644.               <INPUT
  645.               Name=ServKonf
  646.               Type="radio"
  647.               Title="LastKonf"
  648.             onclick="LoadKonf('last')">
  649.             
  650.             <Input
  651.             Type="button"
  652.             Class="Button"
  653.               OnClick="ShowHelp('last')"
  654.               name="shelp4"
  655.               Value=" ? "
  656.               onMouseOver="high(shelp4)"
  657.                 onMouseOut="low(shelp4)"
  658.               Title="Informace pro danou konfiguraci"/>
  659.               
  660.               <Input
  661.             Class="Label"
  662.               ID=Lastlabel
  663.             Type=text
  664.               Value="Obnovenφ poslednφ nastavenΘ konfigurace slu₧eb"
  665.               Size=90 READONLY>
  666.         </TD>
  667.         <TR>
  668.         <TD>
  669.               <INPUT
  670.               Name=ServKonf
  671.               Type="radio"
  672.               Title="OrgKonf"
  673.             onclick="LoadKonf('org')">
  674.             
  675.             <Input
  676.             Type="button"
  677.             Class="Button"
  678.               OnClick="ShowHelp('org')"
  679.               name="shelp5"
  680.               Value=" ? "
  681.               onMouseOver="high(shelp5)"
  682.                 onMouseOut="low(shelp5)"
  683.               Title="Informace pro danou konfiguraci"/>
  684.               
  685.               <Input
  686.             Class="Label"
  687.               ID=Orglabel
  688.             Type=text
  689.               Value="Obnovenφ v²chozφ konfigurace"
  690.               Size=90 READONLY>
  691.         </TD>
  692.     </TR>
  693.     </Table>
  694.     <TABLE WIDTH=80% BORDER=0 CELLPADDING=4 CELLSPACING=2>    <TR>
  695.     <TR>
  696.         <TD WIDTH=100%>
  697.             <B>Podrobnosti t²kajφcφ se konfigurace slu₧eb:</B>
  698.         </TD>
  699.     </TR>
  700.     <TR>
  701.         <TD WIDTH=100%>
  702.              <Span Class=Textbox Name=TheFrame id=TheFrame style="WIDTH: 670px; HEIGHT: 270px; overflow:auto"></Span>
  703.          </TD>
  704.     </TR>
  705.     </TABLE>
  706.     <TABLE WIDTH=100% BORDER=0 CELLPADDING=4 CELLSPACING=2>
  707.     <TR>
  708.         <TD WIDTH=100%>
  709.             <Input
  710.             Type="button"
  711.             Class="Button"
  712.               OnClick="SubSet"
  713.               name="setit"
  714.               Value="Pou₧φt"
  715.               onMouseOver="high(setit)"
  716.                onMouseOut="low(setit)"
  717.               Title="Pou₧ije vybranou konfiguraci slu₧eb"/>
  718.           
  719.             <Input
  720.             Type="button"
  721.             Class="Button"
  722.               OnClick="SaveConfig"
  723.               name="saveit"
  724.               Value="Ulo₧enφ aktußlnφ konfigurace"
  725.               onMouseOver="high(saveit)"
  726.                 onMouseOut="low(saveit)"
  727.               Title="Ulo₧φ aktußlnφ nastavenφ slu₧eb (jinak se provßdφ automaticky)"/>
  728.  
  729.               <Input
  730.               Type="button"
  731.               Class=Button
  732.               OnClick="SubQuit"
  733.               Name="Ende"
  734.               Value="Konec"
  735.               onMouseOver="high(Ende)"
  736.                 onMouseOut="low(Ende)"
  737.               Title="UkonΦenφ utility"/>
  738.         </TD>
  739.     </TR>
  740.   </TABLE>
  741.  </BODY>
  742. </HTML>
  743.